Breadth First Search Using Python